package org.test;

import java.io.IOException;
import java.io.OutputStream;

import org.noka.itextpdf.text.Document;
import org.noka.itextpdf.text.Font;
import org.noka.itextpdf.text.PageSize;
import org.noka.itextpdf.text.pdf.BaseFont;
import org.noka.itextpdf.text.pdf.PdfWriter;

public class Tpdf {

	public static void main(String[] args){
		Document document = null;
		try{
			//String wdname = request.getParameter("wdname");//通过request获取页面名为wdname的查询输入项
			document = new Document(PageSize.A4);
			PdfWriter. getInstance(document,new OutputStream() {
				
				@Override
				public void write(int b) throws IOException {
					// TODO Auto-generated method stub
					
				}
			});//simfang.ttf
			document.open();
			BaseFont bfComic0= BaseFont.createFont(BaseFont.RESOURCE_PATH+"/simfang.ttf", BaseFont.IDENTITY_H, true);
			Font title_font = new Font(bfComic0, 16);
			Font body_font = new Font(bfComic0, 9);
		}catch(Exception se){
			se.printStackTrace();
		}
	}
}
